// @ts-ignore
/* eslint-disable */
import request from "../utils/request.ts";

/** add POST /api/user/add */
export async function addUsingPost(
  body: API.AddUserDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/user/add", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** getCheckCode GET /api/user/checkCode */
export async function getCheckCodeUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseMapStringString_>("/api/user/checkCode", {
    method: "GET",
    ...(options || {}),
  });
}

/** getEmailCode POST /api/user/emailCode */
export async function getEmailCodeUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getEmailCodeUsingPOSTParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/user/emailCode", {
    method: "POST",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** getUserInfo GET /api/user/get */
export async function getUserInfoUsingGet1(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getUserInfoUsingGET1Params,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseUserInfoAdminVO_>("/api/user/get", {
    method: "GET",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** getUserInfoVo GET /api/user/get/vo */
export async function getUserInfoVoUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getUserInfoVoUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseUserVo_>("/api/user/get/vo", {
    method: "GET",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** ipAddress GET /api/user/getIdAddress */
export async function ipAddressUsingGet(options?: { [key: string]: any }) {
  return request<Record<string, any>>("/api/user/getIdAddress", {
    method: "GET",
    ...(options || {}),
  });
}

/** getUserInfo GET /api/user/getUserInfo */
export async function getUserInfoUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseUser_>("/api/user/getUserInfo", {
    method: "GET",
    ...(options || {}),
  });
}

/** listUserByPage POST /api/user/list/page */
export async function listUserByPageUsingPost(
  body: API.UserQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageUser_>("/api/user/list/page", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** login POST /api/user/login */
export async function loginUsingPost(
  body: API.LoginDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/user/login", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** logout GET /api/user/logout */
export async function logoutUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean_>("/api/user/logout", {
    method: "GET",
    ...(options || {}),
  });
}

/** register POST /api/user/register */
export async function registerUsingPost(
  body: API.RegiSterDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/user/register", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** removeUser POST /api/user/remove */
export async function removeUserUsingPost(
  body: API.RemoveUserDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/user/remove", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** adminUpdateUser POST /api/user/update/user */
export async function adminUpdateUserUsingPost(
  body: API.AdminUpdateUserDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/user/update/user", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** updatePassword POST /api/user/updatePassword */
export async function updatePasswordUsingPost(
  body: API.UpdatePasswordDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/user/updatePassword", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** updateUserinfo POST /api/user/updateUserinfo */
export async function updateUserinfoUsingPost(
  body: API.UpdateUserinfoDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/user/updateUserinfo", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** checkCode POST /api/user/verificationCode */
export async function checkCodeUsingPost(
  body: API.CheckCodeDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>("/api/user/verificationCode", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
